package VN.EDU.IMIC.DEVELOPER.VUVANLUANLEVEL2.EXAM01;

import java.util.Scanner;

public class Traingleviews {
	public static void main(String[] args) {
		TraingleEntity Obj = new TraingleEntity();
		System.out.println(" xin moi nhap ba canh cua tam giac !");
		Scanner sc = new Scanner(System.in);
		System.out.println("Canh thu nhat :");
		Obj.setSide1(sc.nextDouble());
		System.out.println("Canh thu hai :");
		Obj.setSide2(sc.nextDouble());
		System.out.println("Canh thu ba :");
		Obj.setSide3(sc.nextDouble());
	
	TraingleController ObjController = new TraingleController();
	if (		Obj.getSide1() + 		Obj.getSide2() - 		Obj.getSide3() <= 0||		Obj.getSide2() + 		Obj.getSide3() - 		Obj.getSide1() <= 0||
			Obj.getSide1() + 		Obj.getSide3() - 		Obj.getSide2() <= 0){System.out.println("Ba canh tren khong phai ba canh tam giac. Moi nhap lai");
				}
			else {
	System.out.println("Co dien tich la :" + ObjController.getArea(Obj));
	System.out.println("Co chu vi la : "+ ObjController.getpermeter(Obj));

}
}
}